<template>
    <div class="customBox">
        <div class="anchorBox">
            <ul>
                <li @click="goRegister(0)">基本信息</li>
                <li @click="goRegister(1)" v-if="form.A009.itemValue == 2">企业信息</li>
                <li @click="goRegister(1)" v-if="form.A009.itemValue == 1">工作信息</li>
                <li @click="goRegister(2)">房屋信息</li>
                <li @click="goRegister(3)">车辆信息</li>
                <li @click="goRegister(4)">保单信息</li>
                <li @click="goRegister(5)">流水信息</li>
                <li @click="goRegister(6)">负债信息</li>
                <li @click="goRegister(7)">法律信息</li>
                <li @click="goRegister(8)">征信信息</li>
            </ul>
        </div>
        <!-- 添加或修改产品信息 -->
        <el-form ref="form" :model="form" :rules="rules" :inline="true" label-width="100px">
            <el-row>
                <div>
                    <label>姓名：</label>
                    <span>{{myName}}</span>
                </div>
            </el-row>
            <div class="table_con">
                <table class="product-type thead_title">
                    <tr>
                        <th width="10%">分类</th>
                        <th width="25%">产品项名称</th>
                        <th>产品项属性范围</th>
                    </tr>
                </table>
                <div class="tbody_box" :style="'height:'+tableHeight">
                    <table class="product-type tbody_con">
                            <!-- 基本信息 -->
                            <tbody class="step-jump">

                                <tr>
                                    <td width="10%" rowspan="12" style="border-right:1px solid #dfe6ec;">基本信息</td>
                                    <td width="25%">借款人姓名</td>
                                    <td align="left">
                                        <el-input v-model="form.A018.itemValue" placeholder="请输入借款人姓名" size="small" class="w240" />
                                    </td>
                                </tr>


                                <tr v-if="form.A019.itemValue == 2">
                                    <td>联系电话</td>
                                    <td>
                                        <el-input v-model="form.A019.itemValue" placeholder="请输入联系电话" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr v-if="form.A019.itemValue == 2">
                                    <td>申请金额(万)</td>
                                    <td>
                                        <el-input v-model="form.A020.itemValue" placeholder="请输入申请金额" size="small" class="w240" />
                                    </td>
                                </tr>

                                <tr v-if="form.A019.itemValue == 2">
                                    <td>期望到款时间</td>
                                    <td>
                                        <el-date-picker v-model="form.A021.itemValue" type="date" placeholder="选择日期" class="w240"></el-date-picker>
                                    </td>
                                </tr>

                                <tr>
                                    <td >借款人年龄</td>
                                    <td >
                                        <el-input v-model="form.A001.itemValue" placeholder="请输入借款人年龄" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>工作性质</td>
                                    <td>
                                        <el-select v-model="form.A009.itemValue" class="w240">
                                            <el-option label="工薪族" value="1" />
                                            <el-option label="企业主" value="2" />
                                            <el-option label="自由职业" value="3" />
                                        </el-select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>是否结婚</td>
                                    <td align="left">
                                        <el-select v-model="form.A003.itemValue" class="w240">
                                            <el-option label="未婚" value="1" />
                                            <el-option label="已婚" value="2" />
                                            <el-option label="离异" value="3" />
                                            <el-option label="丧偶" value="4" />
                                        </el-select>
                                    </td>
                                </tr>
                                <tr v-if="form.A003.itemValue == 2">
                                    <td>配偶年龄</td>
                                    <td>
                                        <el-input v-model="form.A002.itemValue" placeholder="请输入配偶年龄" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr v-if="form.A003.itemValue == 2">
                                    <td>配偶能否知晓贷款</td>
                                    <td>
                                        <el-radio v-model="form.A010.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.A010.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>父母是否可知晓</td>
                                    <td>
                                        <el-radio v-model="form.A015.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.A015.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>申请人是否本地有房</td>
                                    <td>
                                        <el-radio v-model="form.A016.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.A016.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>申请人是否本地有车</td>
                                    <td>
                                        <el-radio v-model="form.A017.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.A017.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                            </tbody>

                            <!-- 企业信息 -->
                            <tbody class="step-jump" v-if="form.A009.itemValue == 2">
                                <tr>
                                    <td rowspan="23" style="border-right:1px solid #dfe6ec;">企业信息</td>
                                    <td>营业执照成立时间</td>
                                    <td>
                                         <el-date-picker v-model="form.B001.itemValue" type="date" placeholder="选择日期" class="w240"></el-date-picker>
                                        <!-- <el-input v-model="form.B001.itemValue" placeholder="请输入" size="small" class="w240" /> -->
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业纳税等级</td>
                                    <td>
                                        <el-select v-model="form.B002.itemValue" class="w240">
                                            <el-option label="A级" value="0" />
                                            <el-option label="B级" value="1" />
                                            <el-option label="M级" value="4" />
                                            <el-option label="C级" value="2" />
                                            <el-option label="D级" value="3" />
                                            <el-option label="未知" value="5" />
                                        </el-select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>营业执照（企业）注册地</td>
                                    <td>
                                        <el-select v-model="form.B003.provinceCode" @change="getCityList(2,form.B003.provinceCode,'add','B003')" class="w150">
                                            <el-option v-for="(item,index) in provinceList" :key="index" :label="item.area_name" :value="item.id" />
                                        </el-select>
                                         <el-select v-model="form.B003.cityCode" class="w150">
                                            <el-option v-for="(item,index) in city3.cityList" :key="index" :label="item.area_name" :value="item.id" />
                                        </el-select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业注册资本(万)</td>
                                    <td>
                                        <el-input v-model="form.B004.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业近12个月的纳税额</td>
                                    <td>
                                        <el-input v-model="form.B005.itemValue" @change="taxAmountFn()" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业近13-24个月的纳税额</td>
                                    <td>
                                        <el-input v-model="form.B006.itemValue" @change="taxAmountFn()" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业近25-36个月的纳税额</td>
                                    <td>
                                        <el-input v-model="form.B007.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <!-- <tr>
                                    <td>纳税有无断缴</td>
                                    <td>
                                        <el-radio v-model="form.B008.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B008.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                
                                <tr>
                                    <td>企业负债额</td>
                                    <td>
                                        <el-input v-model="form.B010.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                             <!--   <tr>
                                    <td>企业有没有人法执行等案件</td>
                                    <td>
                                        <el-radio v-model="form.B011.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B011.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>当前是否正常运营</td>
                                    <td>
                                        <el-radio v-model="form.B012.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B012.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <!-- <tr>
                                    <td>企业能否能实地调查</td>
                                    <td>
                                        <el-radio v-model="form.B009.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B009.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>企业年营业额(万)</td>
                                    <td>
                                        <el-input v-model="form.B013.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>近12个月与近12-24个月下降比%(纳税额)</td>
                                    <td>
                                        <el-input v-model="form.B014.itemValue" placeholder="请输入" size="small" :disabled="true" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业首次开票时间</td>
                                    <td>
                                         <el-date-picker v-model="form.B015.itemValue" type="date" placeholder="选择日期" class="w240"></el-date-picker>
                                        <!-- <el-input v-model="form.B015.itemValue" placeholder="请输入" size="small" class="w240" /> -->
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业近12个月的开票额</td>
                                    <td>
                                        <el-input v-model="form.B016.itemValue" @input="calcInvoiceFn()" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业近18个月的开票额</td>
                                    <td>
                                        <el-input v-model="form.B017.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业近24个月总开票额</td>
                                    <td>
                                        <el-input v-model="form.B018.itemValue" @input="calcInvoiceFn()" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <!-- <tr>
                                    <td>近两年内开票最长断开周期（月）</td>
                                    <td>
                                        <el-input v-model="form.B019.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>借款人在公司职位</td>
                                    <td>
                                        <el-select v-model="form.B020.itemValue" class="w240">
                                            <el-option label="法人" value="0" />
                                            <el-option label="股东" value="1" />
                                        </el-select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>借款人占股比例</td>
                                    <td>
                                        <el-input v-model="form.B021.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <!-- <tr>
                                    <td>法人占股比例</td>
                                    <td>
                                        <el-input v-model="form.B022.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>其他股东能否签字</td>
                                    <td>
                                        <el-radio v-model="form.B023.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B023.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                
                                <!-- <tr>
                                    <td>是否有营业执照</td>
                                    <td>
                                        <el-radio v-model="form.B025.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B025.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>企业性质</td>
                                    <td>
                                        <el-select v-model="form.B026.itemValue" class="w240">
                                            <el-option label="有限公司" value="1" />
                                            <el-option label="个体工商户" value="2" />
                                        </el-select>
                                    </td>
                                </tr>
                             <!--   <tr>
                                    <td>是否实际经营</td>
                                    <td>
                                        <el-radio v-model="form.B027.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B027.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>近12个月与近12-24个月下降比(开票额)</td>
                                    <td>
                                        <el-input v-model="form.B028.itemValue" placeholder="请输入" size="small" :disabled="true" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业(经营场所)所在地</td>
                                    <td>
                                        <el-select v-model="form.B029.provinceCode" @change="getCityList(2,form.B029.provinceCode,'add','B029')" class="w100">
                                            <el-option v-for="(item,index) in provinceList" :key="index" :label="item.area_name" :value="item.id" />
                                        </el-select>
                                        <el-select v-model="form.B029.cityCode" @change="getCityList(3,form.B029.cityCode,'add','B029')" class="w100">
                                            <el-option v-for="(item,index) in city4.cityList" :key="index" :label="item.area_name" :value="item.id" />
                                        </el-select>
                                        <el-select v-model="form.B029.areaCode" class="w180">
                                            <el-option v-for="(item,index) in city4.areaList" :key="index" :label="item.area_name" :value="item.id" />
                                        </el-select>
                                    </td>
                                </tr>
                             <!--  <tr>
                                    <td>可否上门拍照</td>
                                    <td>
                                        <el-radio v-model="form.B030.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B030.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>近一年营业额</td>
                                    <td>
                                        <el-input v-model="form.B031.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>近两年营业额</td>
                                    <td>
                                        <el-input v-model="form.B032.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <!-- <tr>
                                    <td>近一年净利润</td>
                                    <td>
                                        <el-input v-model="form.B033.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>近两年净利润</td>
                                    <td>
                                        <el-input v-model="form.B034.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                               <!-- <tr>
                                    <td>股东能否知晓</td>
                                    <td>
                                        <el-input v-model="form.B035.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>申请人半年内是否有职位或者股份变更</td>
                                    <td>
                                        <el-radio v-model="form.B024.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B024.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>法人是否有变更</td>
                                    <td>
                                        <el-radio v-model="form.B036.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.B036.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>法人变更时间</td>
                                    <td>
                                        <el-date-picker v-model="form.B037.itemValue" type="date"  placeholder="选择日期"></el-date-picker>
                                    </td>
                                </tr> -->
                            </tbody>

                            <!-- 工作信息 -->
                            <tbody class="step-jump" v-if="form.A009.itemValue == 1">
                                <tr>
                                    <td rowspan="11" style="border-right:1px solid #dfe6ec;">工作信息</td>
                                    <td>单位名称</td>
                                    <td>
                                        <el-input v-model="form.C009.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>单位性质</td>
                                    <td>
                                        <el-select v-model="form.C011.itemValue" class="w240">
                                            <el-option label="政府单位" value="1" />
                                            <el-option label="事业单位" value="2" />
                                            <el-option label="国企" value="3" />
                                            <el-option label="私企" value="4" />
                                        </el-select>
                                    </td>
                                </tr>
                            
                                <tr>
                                    <td>当前工作单位入职时间</td>
                                    <td>
                                        <el-date-picker v-model="form.C001.itemValue" type="date"  placeholder="选择日期"></el-date-picker>
                                    </td>
                                </tr>

                                <tr>
                                    <td>是否缴纳公积金</td>
                                    <td>
                                        <el-radio v-model="form.C002.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.C002.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>是否缴纳社保</td>
                                    <td>
                                        <el-radio v-model="form.C003.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.C003.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <!-- <tr>
                                    <td>是否有打卡工资</td>
                                    <td>
                                        <el-radio v-model="form.C004.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.C004.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>借款人是否是本地人</td>
                                    <td>
                                        <el-radio v-model="form.C005.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.C005.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>本地人打卡工资时限</td>
                                    <td>
                                        <el-input v-model="form.C006.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>非本地人打卡工资时限</td>
                                    <td>
                                        <el-input v-model="form.C007.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>社保缴纳年限</td>
                                    <td>
                                        <el-input v-model="form.C008.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                                <tr>
                                    <td>公积金缴存地</td>
                                    <td>
                                        <el-select v-model="form.C010.provinceCode" @change="getCityList(2,form.C010.provinceCode,'add','C010')" class="w100">
                                            <el-option v-for="(item,index) in provinceList" :key="index" :label="item.area_name" :value="item.id" />
                                        </el-select>
                                        <el-select v-model="form.C010.cityCode" class="w180">
                                            <el-option v-for="(item,index) in city5.cityList" :key="index" :label="item.area_name" :value="item.id" />
                                        </el-select>
                                    </td>
                                </tr>
                                
                                <tr>
                                    <td>公积金每月个缴金额(元)</td>
                                    <td>
                                        <el-input v-model="form.C012.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>公积金缴存基数</td>
                                    <td>
                                        <el-input v-model="form.C013.itemValue" disabled = "false" placeholder="请输入"  size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>公积金缴存比例</td>
                                    <td>
                                        <el-input v-model="form.C014.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>公积金缴存起始年月</td>
                                    <td>
                                        <el-date-picker v-model="form.C015.itemValue" type="month" placeholder="选择月"></el-date-picker>
                                    </td>
                                </tr>
                                <tr>
                                    <td>公积金近一年是否断缴记录</td>
                                    <td>
                                        <el-radio v-model="form.C016.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.C016.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <!-- <tr>
                                    <td>单位电话是否能接回访电话</td>
                                    <td>
                                        <el-radio v-model="form.C017.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.C017.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>单位是否能实地调查</td>
                                    <td>
                                        <el-radio v-model="form.C018.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.C018.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr> -->
                                <!-- <tr>
                                    <td>打卡工资金额</td>
                                    <td>
                                        <el-input v-model="form.C019.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr> -->
                            </tbody>

                            <!-- 房屋信息 -->
                            <tbody class="step-jump">
                                <tr>
                                    <td :rowspan="houseList.length + 1" style="border-right: 1px solid rgb(223, 230, 236);">房屋信息</td>
                                    <td style="font 2px">房屋信息列表</td>
                                    <td><el-button type="primary" icon="el-icon-plus" size="mini" @click="addHouse" >新增</el-button></td>
                                </tr>
                                <tr v-for="(item,index) in houseList" :key="index">
                                    <td>小区名称：{{item.houseName}} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;市值: {{item.price}} (万)</td>
                                    <td>
                                        <el-button type="warning" icon="el-icon-edit" size="mini" @click="addHouse(item)" >编辑</el-button>
                                        <el-button type="danger" icon="el-icon-delete" size="mini" @click="delInfoList(item.houseId,0)" >删除</el-button>
                                    </td>
                                </tr>
                            </tbody>
                            <tbody class="step-jump">
                                <tr>
                                    <td :rowspan="carList.length + 1" style="border-right: 1px solid rgb(223, 230, 236);">车辆信息</td>
                                    <td>车辆信息列表</td>
                                    <td><el-button type="primary" icon="el-icon-plus" size="mini" @click="addCar" >新增</el-button></td>
                                </tr>
                                <tr v-for="(item,index) in carList" :key="index">
                                    <td>类型：{{item.carType}}  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;估值：{{item.price}}(万)</td>
                                    <td>
                                        <el-button type="warning" icon="el-icon-edit" size="mini" @click="addCar(item)" >编辑</el-button>
                                        <el-button type="danger" icon="el-icon-delete" size="mini" @click="delInfoList(item.carId, 1)" >删除</el-button>
                                    </td>
                                </tr>
                            </tbody>
                            <tbody class="step-jump">
                                <tr>
                                    <td :rowspan="insuranceList.length + 1" style="border-right: 1px solid rgb(223, 230, 236);">保单信息</td>
                                    <td >保单信息列表</td>
                                    <td><el-button type="primary" icon="el-icon-plus" size="mini" @click="addInsurance" >新增</el-button></td>
                                </tr>
                                <tr v-for="(item,index) in insuranceList" :key="index">
                                    <td>类型：{{item.insuranceType}}  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;金额：{{item.price}}</td>
                                    <td>
                                        <el-button type="warning" icon="el-icon-edit" size="mini" @click="addInsurance(item)" >编辑</el-button>
                                        <el-button type="danger" icon="el-icon-delete" size="mini" @click="delInfoList(item.insuranceId, 2)" >删除</el-button>
                                    </td>
                                </tr>
                            </tbody>
                            <!-- 保单信息 -->
                            <!--  -->
                            
                            <!-- 流水信息 -->
                            <tbody class="step-jump">
                                <tr>
                                    <td rowspan="4" style="border-right:1px solid #dfe6ec;">流水信息</td>
                                    <td>本人近半年进账流水(万)(包含微信支付宝的账单流水)</td>
                                    <td>
                                        <el-input v-model="form.G001.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr v-if="form.A003.itemValue == 2">
                                    <td>配偶近半年进账流水(万)(包含微信支付宝的账单流水)</td>
                                    <td>
                                        <el-input v-model="form.G002.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr v-if="form.A003.itemValue == 2">
                                    <td>夫妻近半年进账流水(万)(本人+配偶近半年流水)</td>
                                    <td>
                                        <el-input v-model="form.G003.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr v-if="form.A009.itemValue == 2">
                                    <td>企业对公户近一年流水(万)</td>
                                    <td>
                                        <el-input v-model="form.G004.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                            </tbody>

                            <!-- 负债信息 -->
                            <tbody class="step-jump">                              
                                <tr>
                                    <td :rowspan="form.A009.itemValue == 2 ? 10 : 9" style="border-right:1px solid #dfe6ec;">负债信息</td>
                                    <td>抵押/按揭负债总余额</td>
                                    <td>
                                        <el-input v-model="form.F002.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>信用负债总余额</td>
                                    <td>
                                        <el-input v-model="form.F003.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>信用卡近6个月平均使用额度</td>
                                    <td>
                                        <el-input v-model="form.F004.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>当前贷款总月供为</td>
                                    <td>
                                        <el-input v-model="form.F005.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>信用贷已放款总机构数</td>
                                    <td>
                                        <el-input v-model="form.F006.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>所有信用卡总授信额度</td>
                                    <td>
                                        <el-input v-model="form.F007.itemValue" @input="calcCreditFn()" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>所有信用卡当前已用总额度</td>
                                    <td>
                                        <el-input v-model="form.F008.itemValue" @input="calcCreditFn()" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>信用卡使用率(%)</td>
                                    <td>
                                        <el-input v-model="form.F009.itemValue" placeholder="请输入" :disabled="true" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>小贷负债余额(小贷指非银行机构发放的信用贷)</td>
                                    <td>
                                        <el-input v-model="form.F010.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr v-if="form.A009.itemValue == 2">
                                    <td>当前企业总负债余额(以企业名义借款且上企业征信)</td>
                                    <td>
                                        <el-input v-model="form.F011.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                            </tbody>
                                
                            <!-- 法律信息 -->
                            <tbody class="step-jump">
                                <tr>
                                    <td rowspan="3" style="border-right:1px solid #dfe6ec;">法律信息</td>
                                    <td>企业/个人是否有未结案被告官司</td>
                                    <td>
                                        <el-radio v-model="form.H001.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.H001.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业/个人近5年是否有被告记录</td>
                                    <td>
                                        <el-select v-model="form.H002.itemValue" class="w240">
                                            <el-option label="无被告记录" value="1" />
                                            <el-option label="有被告记录,有结案证明" value="2" />
                                            <el-option label="有被告记录,无结案证明" value="3" />
                                        </el-select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>企业/个人近5年是否有被执行记录</td>
                                    <td>
                                        <el-radio v-model="form.H003.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.H003.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                            </tbody>

                            <!-- 征信信息 -->
                            <tbody class="step-jump">
                                <tr>
                                    <td rowspan="20" style="border-right:1px solid #dfe6ec;">征信信息</td>
                                    <td>近五年有无逾期</td>
                                    <td>
                                        <el-radio v-model="form.E001.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.E001.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>近五年逾期次数</td>
                                    <td>
                                         <!-- <el-select v-model="form.E002.itemValue" class="w240">
                                            <el-option label="1-3次" value="1" />
                                            <el-option label="4-6次" value="2" />
                                            <el-option label="6-9次" value="3" />
                                            <el-option label="10-15次" value="4" />
                                            <el-option label="15次以上" value="5" />
                                        </el-select> -->
                                         <el-input v-model="form.E002.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                    
                                </tr>

                                <tr>
                                    <td>近五年逾期最大显示(近五年有逾期才生效)</td>
                                    <td>
                                        <el-select v-model="form.E017.itemValue" class="w240">
                                            <el-option label="N" value="0" />
                                            <el-option label="1" value="1" />
                                            <el-option label="2" value="2" />
                                            <el-option label="3" value="3" />
                                            <el-option label="4" value="4" />
                                            <el-option label="5" value="5" />
                                            <el-option label="6" value="6" />
                                            <el-option label="7" value="7" />
                                        </el-select>
                                    </td>
                                </tr>


                                <tr>
                                    <td>近两年有无逾期</td>
                                    <td>
                                        <el-radio v-model="form.E003.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.E003.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>近两年逾期次数</td>
                                    <td>
                                         <!-- <el-select v-model="form.E004.itemValue" class="w240">
                                            <el-option label="1-3次" value="1" />
                                            <el-option label="4-6次" value="2" />
                                            <el-option label="6-9次" value="3" />
                                            <el-option label="10-15次" value="4" />
                                            <el-option label="15次以上" value="5" />
                                        </el-select> -->
                                        <el-input v-model="form.E004.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>

                                <tr>
                                    <td>近两年逾期最大显示(近两年有逾期才生效)</td>
                                    <td>
                                         <el-select v-model="form.E018.itemValue" class="w240">
                                            <el-option label="N" value="0" />
                                            <el-option label="1" value="1" />
                                            <el-option label="2" value="2" />
                                            <el-option label="3" value="3" />
                                            <el-option label="4" value="4" />
                                            <el-option label="5" value="5" />
                                            <el-option label="6" value="6" />
                                            <el-option label="7" value="7" />
                                        </el-select>
                                    </td>
                                </tr>


                                <tr>
                                    <td>近一年有无逾期</td>
                                    <td>
                                        <el-radio v-model="form.E005.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.E005.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>近一年逾期次数</td>
                                    <td>
                                         <!-- <el-select v-model="form.E006.itemValue" class="w240">
                                            <el-option label="1-3次" value="1" />
                                            <el-option label="4-6次" value="2" />
                                            <el-option label="6-9次" value="3" />
                                            <el-option label="10-15次" value="4" />
                                            <el-option label="15次以上" value="5" />
                                        </el-select> -->
                                        <el-input v-model="form.E006.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>

                                <tr>
                                    <td>近一年逾期最大显示(近一年有逾期才生效)</td>
                                    <td>
                                         <el-select v-model="form.E019.itemValue" class="w240">
                                            <el-option label="N" value="0" />
                                            <el-option label="1" value="1" />
                                            <el-option label="2" value="2" />
                                            <el-option label="3" value="3" />
                                            <el-option label="4" value="4" />
                                            <el-option label="5" value="5" />
                                            <el-option label="6" value="6" />
                                            <el-option label="7" value="7" />
                                        </el-select>
                                    </td>
                                </tr>

                                <tr>
                                    <td>近半年有无逾期</td>
                                    <td>
                                        <el-radio v-model="form.E007.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.E007.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>近半年逾期次数</td>
                                    <td>
                                         <!-- <el-select v-model="form.E008.itemValue" class="w240">
                                            <el-option label="1-3次" value="1" />
                                            <el-option label="4-6次" value="2" />
                                            <el-option label="6-9次" value="3" />
                                            <el-option label="10-15次" value="4" />
                                            <el-option label="15次以上" value="5" />
                                        </el-select> -->
                                        <el-input v-model="form.E008.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>

                                <tr>
                                    <td>近半年逾期最大显示(近半年有逾期才生效)</td>
                                    <td>
                                         <el-select v-model="form.E020.itemValue" class="w240">
                                            <el-option label="N" value="0" />
                                            <el-option label="1" value="1" />
                                            <el-option label="2" value="2" />
                                            <el-option label="3" value="3" />
                                            <el-option label="4" value="4" />
                                            <el-option label="5" value="5" />
                                            <el-option label="6" value="6" />
                                            <el-option label="7" value="7" />
                                        </el-select>
                                    </td>
                                </tr>

                                <tr>
                                    <td>当前有无逾期</td>
                                    <td>
                                        <el-radio v-model="form.E011.itemValue" label="0">否</el-radio>
                                        <el-radio v-model="form.E011.itemValue" label="1">是</el-radio>
                                    </td>
                                </tr>
                                <tr>
                                    <td>当前逾期总金额(万)</td>
                                    <td>
                                        <el-input v-model="form.E012.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>

                                <tr>
                                    <td>近两个月审批查询次数</td>
                                    <td>
                                        <el-select v-model="form.E009.itemValue" class="w240">
                                            <el-option label="无查询" value="1" />
                                            <el-option label="1-3次" value="2" />
                                            <el-option label="4-6次" value="3" />
                                            <el-option label="6-9次" value="4" />
                                            <el-option label="10-15次" value="5" />
                                            <el-option label="15次以上" value="6" />
                                        </el-select>
                                    </td>
                                </tr>

                                <tr>
                                    <td>近六个月审批查询次数</td>
                                    <td>
                                        <el-select v-model="form.E010.itemValue" class="w240">
                                            <el-option label="无查询" value="1" />
                                            <el-option label="1-3次" value="2" />
                                            <el-option label="4-6次" value="3" />
                                            <el-option label="6-9次" value="4" />
                                            <el-option label="10-15次" value="5" />
                                            <el-option label="15次以上" value="6" />
                                        </el-select>
                                    </td>
                                </tr>

                                <tr>
                                    <td>征信账户状态包含</td>
                                    <td>
                                        <el-select v-model="form.E013.itemValue" multiple class="w240">
                                            <el-option label="逾期" value="1" />
                                            <el-option label="呆账" value="2" />
                                            <el-option label="转出" value="3" />
                                            <el-option label="止付" value="4" />
                                            <el-option label="关注" value="5" />
                                            <el-option label="以上皆无" value="6" />
                                        </el-select>
                                    </td>
                                </tr>

                                
                                <tr>
                                    <td>未结清经营性贷款机构数</td>
                                    <td>
                                        <el-input v-model="form.E014.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>未结清小贷机构数</td>
                                    <td>
                                        <el-input v-model="form.E015.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>未结清贷款总机构数</td>
                                    <td>
                                        <el-input v-model="form.E016.itemValue" placeholder="请输入" size="small" class="w240" />
                                    </td>
                                </tr>
                            </tbody>
                    </table>
                </div>
            </div>
        </el-form>
        <div class="dialog-footer">
            <el-button type="primary" @click="submitForm" v-if="!isShowCus">提 交</el-button>
            <el-button @click="close">取 消</el-button>
        </div>
        <!-- 房屋弹框 -->
        <house v-if="dialogHouse" :dialogHouse="dialogHouse" :paramsData="paramsData" @closeHouse="closeHouse"></house>
        <vehicle v-if="dialogVehicle" :dialogVehicle="dialogVehicle" :paramsData="paramsData" @closeVehicle="closeVehicle"></vehicle>
        <insurance v-if="dialogInsurance" :dialogInsurance="dialogInsurance" :paramsData="paramsData" @closeInsurance="closeInsurance"></insurance>
    </div>
</template>

<script>
import { getCustomerProductDetailInfo, addCustomerProductInfo,deleteCustomerAttachInfo, getCustomerHouseList,getCustomerInsuranceList, getCustomerCarList, exportCityList } from "@/api/system/customer";
import house from '@/views/system/customer/house'
import vehicle from '@/views/system/customer/vehicle'
import insurance from '@/views/system/customer/insurance'

export default {
    name: "EditCustomer",
    components: { house,vehicle,insurance },
    data() {
        return {
            dialogHouse: false,
            dialogVehicle: false,
            dialogInsurance: false,
            productData: {
                cusId: '',
            },
            
            provinceList: [],
            city1:{
                cityList: [],
                areaList: [],
            },
            city2:{
                cityList: [],
                areaList: [],
            },
            city3:{
                cityList: [],
                areaList: [],
            },
            city4:{
                cityList: [],
                areaList: [],
            },
            city5:{
                cityList: [],
                areaList: [],
            },
            city6:{
                cityList: [],
                areaList: [],
            },
            city7:{
                cityList: [],
                areaList: [],
            },

            // 表单校验
            rules: {},
            form: {
                A001:{},
                A002:{},
                A003:{},
                A004:{},
                A005:{},
                A006:{ areaCode: '' },
                A007:{ areaCode: '' },
                A008:{},
                A009:{},
                A010:{},
                A011:{},
                A012:{},
                A013:{},
                A014:{},
                A015:{},
                A016:{},
                A017:{},
                A018:{},
                A019:{},
                A020:{},
                A021:{},
                B001:{},
                B002:{},
                B003:{ cityCode: '' },
                B004:{},
                B005:{},
                B006:{},
                B007:{},
                B008:{},
                B009:{},
                B010:{},
                B011:{},
                B012:{},
                B013:{},
                B014:{},
                B015:{},
                B016:{},
                B017:{},
                B018:{},
                B019:{},
                B020:{},
                B021:{},
                B022:{},
                B023:{},
                B024:{},
                B025:{},
                B026:{},
                B027:{},
                B028:{},
                B029:{ areaCode: '' },
                B030:{},
                B031:{},
                B032:{},
                B033:{},
                B034:{},
                B035:{},
                B036:{},
                B037:{},
                C001:{},
                C002:{},
                C003:{},
                C004:{},
                C005:{},
                C006:{},
                C007:{},
                C008:{},
                C009:{},
                C010:{ cityCode: '' },
                C011:{},
                C012:{},
                C013:{},
                C014:{},
                C015:{},
                C016:{},
                C017:{},
                C018:{},
                C019:{},
                F001:{},
                F002:{},
                F003:{},
                F004:{},
                F005:{},
                F006:{},
                F007:{},
                F008:{},
                F009:{},
                F010:{},
                F011:{},
                G001:{},
                G002:{},
                G003:{},
                G004:{},
                H001:{},
                H002:{},
                H003:{},
                E001:{},
                E002:{},
                E003:{},
                E004:{},
                E005:{},
                E006:{},
                E007:{},
                E008:{},
                E009:{},
                E010:{},
                E011:{},
                E012:{},
                E013:{ itemValue : []},
                E014:{},
                E015:{},
                E016:{},
                E017:{},
                E018:{},
                E019:{},
                E020:{},
                E021:{},
                E022:{},
                E023:{},
            },
            dataInfo: [],
            areaList: [],
            // 表格的高度
            tableHeight: document.documentElement.scrollHeight - 220 + "px",
            myName: '',
            houseList: [],
            insuranceList: [],
            carList: [],
            paramsData: {},
            isShowCus: false,
        };
    },
    created() {
        // 获取省份列表
        this.getProvinceList();

        this.isShowCus = this.$route.query.type === 'show' ? true : false;

        this.productData.cusId = this.$route.query.id;
        this.paramsData.cusId = this.productData.cusId;
        this.paramsData.houseId = this.productData.houseId || '';
        this.paramsData.carId = this.productData.carId || '';
        this.paramsData.insuranceId = this.productData.insuranceId || '';
        this.myName = this.$route.query.name;

        // 获取产品详情
        this.getProductInfo();
        // 获取房屋列表
        this.getHouseList();
        // 获取车辆列表
        this.getInsuranceList();
        // 获取保单列表
        this.getCarList();
    },
    methods: {
        // 纳税额计算
        taxAmountFn(){
            if(this.form.B006.itemValue && this.form.B005.itemValue){
                let val = (this.form.B006.itemValue - this.form.B005.itemValue) / this.form.B006.itemValue;
                this.form.B014.itemValue = val.toFixed(2);
            }
        },
        // 计算开票额
        calcInvoiceFn(){
            if(this.form.B018.itemValue && this.form.B016.itemValue){
                let val = (this.form.B018.itemValue - this.form.B016.itemValue * 2) / (this.form.B018.itemValue - this.form.B016.itemValue);
                this.form.B028.itemValue = val.toFixed(2);
            }
        },
        // 计算信用额度
        calcCreditFn(){
            if(this.form.F008.itemValue && this.form.F007.itemValue){
                let val = this.form.F008.itemValue / this.form.F007.itemValue;
                this.form.F009.itemValue = val.toFixed(2);
            }
        },

        goRegister(index) {
                const tbody_box = this.$el.querySelector('.tbody_box');
                const cateItem = document.querySelectorAll('.step-jump');
                let total = cateItem[index].offsetTop;
                let distance = tbody_box.scrollTop || tbody_box.scrollTop; // 获取到顶部的距离(this.container便是.cate-list,为了方便存起来了)
                let step = total / 50;
                this.isActive = index; // 菜单列表显示当前样式

                if (total > distance) {
                	smoothDown()
                } else {
                    let newTotal = distance - total
                    step = newTotal / 10
                    smoothUp()
                }
                function smoothDown () {
                    if (distance < total) {
                        distance += step
                        tbody_box.scrollTop = distance;
                        setTimeout(smoothDown, 10);
                    } else {
                        tbody_box.scrollTop = total
                    }
                }
                function smoothUp () {
                    if (distance > total) {
                        distance -= step
                        tbody_box.scrollTop = distance
                        setTimeout(smoothUp, 10)
                    } else {
                        tbody_box.scrollTop = total
                    }
                } 
        },

        // 获取房屋列表
        getHouseList(){
            getCustomerHouseList(this.productData.cusId).then(res =>{
                if(res.code === 'success'){
                    this.houseList = res.data;
                }
            })
        },
        
        // 获取车辆列表
        getInsuranceList(){
            getCustomerInsuranceList(this.productData.cusId).then(res =>{
                if(res.code === 'success'){
                    this.insuranceList = res.data;
                }
            })
        },
        
        // 获取保单列表
        getCarList(){
            getCustomerCarList(this.productData.cusId).then(res =>{
                if(res.code === 'success'){
                    this.carList = res.data;
                }
            })
        },

        // 获取产品详情
        getProductInfo(){
            getCustomerProductDetailInfo(this.productData.cusId).then(res => {
                this.productData.productInfos = JSON.parse(JSON.stringify(res.data));
                let proData = res.data;
                for(let i=0;i<proData.length;i++){
                    if(proData[i].cityCode){
                        this.getCityList(2,proData[i].provinceCode,'edit',proData[i].itemCode);
                    }
                    // 区域下拉框多选字符串转数组
                    if(proData[i].areaCode){
                        this.getCityList(3,proData[i].cityCode,'edit',proData[i].itemCode);
                    }
                    if(proData[i].itemCode === 'E013'){
                        var itemVal = (proData[i].itemValue).split(',');
                        this.form[proData[i].itemCode].itemValue = itemVal;
                    }else{
                        this.form[proData[i].itemCode] = proData[i];
                    }
                }
            });
        },

        // 关闭弹框
        closeHouse(data){
            if(data === 'edit'){
                this.getHouseList();
            }
            this.dialogHouse = false;
        },
        closeVehicle(data){
            if(data === 'edit'){
                this.getCarList();
            }
            this.dialogVehicle = false;
        },
        closeInsurance(data){
            if(data === 'edit'){
                this.getInsuranceList();
            }
            this.dialogInsurance = false;
        },
        // 新增房屋信息
        addHouse(data){
            if(data){
                this.paramsData.houseId = data.houseId;
            }
            this.dialogHouse = true;
        },
        // 新增车辆信息
        addCar(data){
            if(data){
                this.paramsData.carId = data.carId;
            }
            this.dialogVehicle = true;
        },
        // 新增保单信息
        addInsurance(data){
            if(data){
                this.paramsData.insuranceId = data.insuranceId;
            }
            this.dialogInsurance = true;
        },

        // 删除数据
        delInfoList(id,type){
            deleteCustomerAttachInfo({id: id,type: type}).then(res => {
                if(res.code === 'success'){
                    this.msgSuccess("删除成功");
                    if(type === 0){
                        this.getHouseList();
                    }else if(type === 1){
                        this.getCarList();
                    }else if(type === 2){
                        this.getInsuranceList();
                    }
                }
            })
        },
        
        // 获取省份列表
        getProvinceList(){
            exportCityList({leveType: 1,parentId: ''}).then(res => {
                if(res.code === 'success'){
                    console.log(res.data, 22)
                    this.provinceList = res.data;
                }
            })
        },

        // 获取省市区
        getCityList(type,id, isprod, code){
            if(isprod === 'add'){
                if(type === 2){
                    switch(code){
                        case 'A006':
                            this.form.A006.cityCode = '';
                            this.form.A006.areaCode = '';
                            break;
                        case 'A007':
                            this.form.A007.cityCode = '';
                            this.form.A007.areaCode = '';
                            break;
                        case 'B003':
                            this.form.B003.cityCode = '';
                            this.form.B003.areaCode = '';
                            break;
                        case 'B029':
                            this.form.B029.cityCode = '';
                            this.form.B029.areaCode = '';
                            break;
                        case 'C010':
                            this.form.C010.cityCode = '';
                            this.form.C010.areaCode = '';
                            break;
                        case 'D001':
                            this.form.D001.cityCode = '';
                            this.form.D001.areaCode = '';
                            break;
                        case 'J001':
                            this.form.J001.cityCode = '';
                            this.form.J001.areaCode = '';
                            break;
                    }
                }else if(type === 3){
                    switch(code){
                        case 'A006':
                            this.form.A006.areaCode = '';
                            break;
                        case 'A007':
                            this.form.A007.areaCode = '';
                            break;
                        case 'B003':
                            this.form.B003.areaCode = '';
                            break;
                        case 'B029':
                            this.form.B029.areaCode = '';
                            break;
                        case 'C010':
                            this.form.C010.areaCode = '';
                            break;
                        case 'D001':
                            this.form.D001.areaCode = '';
                            break;
                        case 'J001':
                            this.form.J001.areaCode = '';
                            break;
                    }
                }
            }
            exportCityList({leveType: type,parentId: id}).then(res => {
                if(res.code === 'success'){
                    if(type === 2){
                        switch(code){
                            case 'A006':
                                this.city1.cityList = res.data;
                                break;
                            case 'A007':
                                this.city2.cityList = res.data;
                                break;
                            case 'B003':
                                this.city3.cityList = res.data;
                                break;
                            case 'B029':
                                this.city4.cityList = res.data;
                                break;
                            case 'C010':
                                this.city5.cityList = res.data;
                                break;
                            case 'D001':
                                this.city6.cityList = res.data;
                                break;
                            case 'J001':
                                this.city7.cityList = res.data;
                                break;
                        }
                    }else if(type === 3){
                        switch(code){
                            case 'A006':
                                this.city1.areaList = res.data;
                                break;
                            case 'A007':
                                this.city2.areaList = res.data;
                                break;
                            case 'B003':
                                this.city3.areaList = res.data;
                                break;
                            case 'B029':
                                this.city4.areaList = res.data;
                                break;
                            case 'C010':
                                this.city5.areaList = res.data;
                                break;
                            case 'D001':
                                this.city6.areaList = res.data;
                                break;
                            case 'J001':
                                this.city7.areaList = res.data;
                                break;
                        }
                    }
                }
            });
        },
        
        /** 提交按钮 */
        submitForm: function() {
            let that = this;
            let productInfos = [];

            for(let key in this.form){
                let item = this.form;
                let itemValue = item[key].itemValue || '';
                if(key === 'A006' || key === 'A007' || key === 'B029'){
                    itemValue = item[key].areaCode;
                }else if(key === 'B003' || key === 'C010'){
                    itemValue = item[key].cityCode;
                }else if(key === 'E013'){
                    itemValue = itemValue.join(',');
                }
                productInfos.push(
                    {
                        "areaCode": item[key].areaCode || '',
                        "cityCode": item[key].cityCode || '',
                        "itemValue": itemValue,
                        "iteamType": item[key].iteamType || '',
                        "itemCode": key || '',
                        "provinceCode": item[key].provinceCode || '',
                    }
                )
            }
            this.productData.productInfos = JSON.stringify(productInfos);
            addCustomerProductInfo(this.productData).then(response => {
                if (response.code === 'success') {
                    this.msgSuccess("修改成功");
                    this.close()
                }
            });
        },
        
        /** 关闭按钮 */
        close() {
            this.$store.dispatch("tagsView/delView", this.$route);
            this.$router.push({ path: "/business/customer", query: { t: Date.now()}})
        },
        
        // 表单重置
        reset() {
            this.form = {
                id: undefined,
                productName: undefined,
                typeLevel1Id: undefined,
                typeLevel1Name: undefined,
                typeLevel2Name: undefined,
                typeLevel2Id: undefined,
                productFeatures: undefined,
                provinceCode: undefined,
                cityCode: undefined,
                areaCode: undefined,
                isOffSheet: undefined,
                isDel: undefined,
                assetsType: undefined,
                assetsTypeName: undefined,
                assetsInfoId: undefined,
                assetsInfoName: undefined,
                createId: undefined,
                createName: undefined,
                createTime: undefined,
                remark: undefined
            };
        this.resetForm("form");
        },
    }
};
</script>
<style lang="scss">
    .product-type{
        th,td{
            padding: 6px 10px;
        }
        .w100{
            width: 100px;
        }
        .w150{
            width: 150px;
        }
        .el-checkbox__inner{
            width: 20px;
            height: 20px;
        }
        .el-checkbox__inner::after{
            left: 7px;
            top: 3px;
        }
    }
    .customBox{
        padding-top: 10px;
        .dialog-footer{
            text-align: center;
            position: absolute;
            bottom: 10px;
            width: 100%;
            left: 0;
        }
        .w300{
            width: 300px;
        }
        .w200{
            width: 200px;
        }
        .w240{
            width: 240px;
        }
        .w150{
            width: 150px;
        }
        .w180{
            width: 180px;
        }
        .el-row{
            font-size: 14px;
            padding-top: 10px;
            label{
                display: inline-block;
                width: 100px;
                text-align: right;
            }
        }

        .thead_title th{
            background: #f8f8f9;
        }
        /* 初始 */
        .table_con{
            margin-top: 5px;
        }
        .table_con table {
            border-spacing:0;
            margin:0;
            white-space:nowrap;
            width:100%;
            table-layout:fixed;
        }
        /*设置表头样式*/
        .table_con table th {
            border-bottom:1px solid #ccc;
        }
        .table_con table th,.table_con table td {
            overflow:hidden;
            text-overflow:ellipsis;
            color:#606266;
            border:none;
            line-height:25px;
            text-align:center;
            font-size: 14px;
        }

        .table_con table th,.table_con table td{
            &:last-child{
                text-align: left;
            }
        }

        .table_con table td{
            border-bottom:1px solid #dfe6ec
        }
        .table_con .tbody_box {
            width:100%;
            overflow-x:hidden;
            overflow-y:auto;
        }

        .tbody_con tr:hover{
            background: #dfe6ec;
        }
        .el-form-item{
            margin-bottom: 0;
        }
        .pointer{
            cursor: pointer;
        }
        
        .anchorBox{
            position: fixed;
            top: 40%;
            right: 30px;
            z-index: 999;
            color: #333;
            font-size: 16px;
            box-shadow: 0 0 5px #999;
            border-radius: 4px;
            background: #fff;
            ul{
                list-style: none;
                margin: 0;
                padding: 10px;
                li{
                    cursor: pointer;
                    line-height: 24px;
                }
            }
        }
    }
</style>